<!doctype html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="telephone=no" name="format-detection">
    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/common/base.min.css">
    <!-- <link rel="stylesheet" href="./css/common/layer.min.css"> -->
    <script src="./js/common/base.min.js"></script>
    <script src="./js/page/layer.min.js"></script>
    <script src="./js/page/jquery.cookie.min.js" charset="utf-8"></script>
    <script src="./js/page/sign.min.js" charset="utf-8"></script>
    <link rel="stylesheet" href="./css/page/android.min.css?v20180525">
    <link href="http://cdn.bootcss.com/highlight.js/8.0/styles/monokai_sublime.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/highlight.js/8.0/highlight.min.js"></script>
    <script src="./js/page/handlebars.min.js"></script>
    <script src="./js/page/qrcode.min.js"></script>
    <script src="./js/page/android.min.js"></script>
    <script>
        hljs.initHighlightingOnLoad();
    </script>
    <script>
        var params = "1731585436"
    </script>
    <title>android集成</title>
    <style type="text/css">
        .layout-content {
            min-width: 1024px;
            box-sizing: content-box;
        }

        .share_list {
            background: url(images/share_img.png) no-repeat 100%;
            background-size: cover;
            height: 240px;
            background-color: #fff;
            float: left;
            min-width: 32%
        }

        .share_list p:first-child {
            font-size: 24px;
            margin: 60px 0 26px 30px;
            color: #282828
        }

        .share_list p:last-child {
            font-size: 30px;
            margin: 0 0 0 30px;
            color: #282828
        }
    </style>
</head>

<body style="background:#fff">
    <div class="layout-container">
        <div class="dashbord-loading" id="_loading_mask">
            <!-- <img src="/images/loading.gif"> -->
        </div>
        <div class="layout-header">
            <div class="logo-bar" style="float:left">
                <a style="display:inline-block;width:100%;height:100%" target="_blank" href="./index.html">
                    <img src="./img/overview/logo.png" alt="" style="margin-top:11px">
                </a>
            </div>
            <div class="pull-right" style="margin:15px 70px 0 0">
                <!-- <div class="app-apidoc fl">
                    <a href="./copywriting.html" target="_blank">接入指南</a>
                </div> -->
                <div class="app-applist fl">
                    <a href="./application.html">应用管理</a>
                </div>
                <ul class="nav nav-pills fl">
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <span id="username"></span>
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- <li><a href="./application.html">应用列表</a></li> -->
                            <!-- <li class="divider"></li> -->
                            <li>
                                <a href="./personal.html">用户信息</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="javascript:;" id='loginOut'>退出登录</a>
                            </li>
                        </ul>
                    </li>
                </ul>

                <div class="fl apppay-state">免费体验中</div>
            </div>
        </div>

        <div class="layout-menu" id="_menu">
            <div class="menu-app">
                <p>
                    <img id="app_icon" style="width:70px;height:70px">
                </p>
                <p id="app_name" style="font-size:18px;padding:15px 0 0;margin:0;color:#fff"></p>
                <p style="margin:5px 0 20px;color:#75777b">
                    <a href="javascript:;" class="common-tip">
                        <span class="tip-content">appKey是shareinstall平台为每个应用分配的唯一标识符，sdk(Android/iOS/javascript)中需指定这个appKey</span>
                    </a>
                    <span style="font-size:14px;font-weight:700;color:#c4c4c4">AppKey：</span>
                    <span id="app_key" style="color:#c4c4c4;font-size:14px"></span>
                </p>
                <p><a href="./editingApplication.html" class="detail_icon"><img src="./img/overview/i.png" alt="" style="vertical-align:middle;margin-right:8px;position: relative;top:-1px">应用信息</a></p>

            </div>
            <div class="menu-items">
                <div class="menu-item item-5">
                    <div class="menu-item-text">
                        <span>应用统计</span>
                    </div>
                    <div class="menu-child">
                        <div class="subItem-1">
                            <a href="./overview.html" class="load-channel-a" id="my-overview">
                                <span class="icon my-overview fl"></span>
                                <p class="fl">数据概览</p>
                            </a>
                        </div>
                    </div>
                </div>
                <div class="menu-item item-1">
                    <div class="menu-item-text">
                        <span>应用集成</span>
                    </div>
                    <div class="menu-child my-active">
                        <div class="subItem-1 active">
                            <a href="javascript:;" class="load-channel-a" id="my-android">
                                <span class="icon my-android fl"></span>
                                <p class="fl"> Android集成</p>
                            </a>
                        </div>
                        <div class="subItem-2">
                            <a href="./ios.html" class="load-channel-a" id="my-ios">
                                <span class="icon my-ios fl"></span>
                                <p class="fl" style="color:#5f6b7e"> iOS集成</p>
                            </a>
                        </div>
                        <div class="subItem-3">
                            <a href="./web.html" class="load-channel-a" id="my-web">
                                <span class="icon my-web fl"></span>
                                <p class="fl" style="color:#5f6b7e">Web集成</p>
                            </a>
                        </div>
                    </div>
                </div>
                <div class="menu-item item-2">
                    <div class="menu-item-text">
                        <span>渠道统计</span>
                    </div>
                    <div class="menu-child ">
                        <div class="subItem-1 ">
                            <a href="./management.html" class="load-channel-a" id="my-qudao1">
                                <span class="icon my-qudao1 fl"></span>
                                <p class="fl">渠道管理</p>
                            </a>
                        </div>
                        <div class="subItem-2">
                            <a href="./comparison.html" class="load-channel-a" id="my-qudao2">
                                <span class="icon my-qudao2 fl"></span>
                                <p class="fl">渠道对比</p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="blank-bg"></div>
        <div style="position:fixed;background:#fff;z-index:2;left:270px;top:90px;right:20px;padding:25px 30px 25px 30px;min-width:1024px">
            <div id="tabs" class="tabs">
                <ul class="tab-form">
                    <li class="active fl">
                        <a href="javascript:;">
                            <span>1</span>Android集成</a>
                    </li>
                    <li class="fl">
                        <a href="javascript:;">
                            <span>2</span>APK包上传</a>
                    </li>
                    <li class="fl">
                        <a href="javascript:;">
                            <span>3</span>Android应用配置</a>
                    </li>
                    <!-- <li class="fl"><a href="javascript:;">Android下载设置</a></li> -->
                </ul>
            </div>
            <div class="integrated" style="float:right;padding-top:4px">
                <a href="javascript:;" class="depoly-line-test test-win-button" style="display:none">在线测试</a>
            </div>
        </div>
        <div class="layout-content" id="_content">
            <div id="tab-panel" class="">

                <div id="_android" class="my-android container my-app" style="">
                    <div class="depoly-said" style="margin:0px 0px 20px;color:#00A4B0">
                        <b style="color:#00A4B0">提示：</b>以下代码（配置）由shareinstall根据当前应用动态生成，开发者可直接使用；按照以下步骤指引，10分钟即可完成Android SDK集成。
                    </div>
                    <h1 style="margin-top:0">一、导入SDK</h1>
                    <div>
                        <div class="mount-text" style="padding-left:25px">
                            <ul style="overflow:hidden">
                                <li style="float:left">
                                    <div class="doc">
                                        <img src="./img/console/sdk.png" alt="" style="width:41px;height:40px;margin:45px auto 10px">
                                        <p>Android SDK</p>
                                        <p style="margin:40px auto 14px">
                                            <a href="http://api.shareinstall.com/download/1.0.6/android">下载</a>
                                        </p>
                                        <p style="font-size:14px">v1.0.6</p>
                                    </div>
                                </li>
                                <li style="float:left;margin-left:46px">
                                    <div class="doc">
                                        <img src="./img/console/demo.png" alt="" style="width:41px;height:40px;margin:45px auto 10px">
                                        <p>Android DEMO</p>
                                        <p style="margin:40px auto 14px">
                                            <a href="http://api.shareinstall.com/download/1.0.6/androiddemo">下载</a>
                                        </p>
                                        <p style="font-size:14px">v1.0.6</p>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <h2>从下载的ShareInstallSdk.zip文件中，将aar文件拷贝到项目的libs文件夹中，并导入</h2>
                    <div>
                        <div>
                            <pre style="width:400px;height:140px">
<code style="width: 100%;height: 80%;" class="lang-javascript">
dependencies {
    compile(name: 'ShareInstall_1.0.6', ext: 'aar')
}
</code>
</pre>

                            <h2>（注：导入aar需检查build文件中是否已经加入以下代码，否则会报错）</h2>
                            <pre style="width:400px;height:160px">
<code style="width: 100%;height: 80%;" class="lang-javascript">
repositories { 
    flatDir {
        dirs 'libs'
    }
}
</code>
</pre>
                            <h1>二、基础配置</h1>
                            <h2>在AndroidMainfest.xml中添加权限声明。</h2>
                            <pre style="width:600px;height:100px">
<code style="width: 100%;height: 80%;" class="lang-javascript">
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
</code>
</pre>

                            <h2>在AndroidMainfest.xml中的application标签中添加分配给你应用的Appkey</h2>

                            <pre style="width:600px;height:120px">
<code style="width: 100%;height: 80%;" class="lang-javascript">
&lt;meta-data    
    android:name="com.shareinstall.APP_KEY"   
    android:value="<span class="doc-appkey">shareinstall为当前应用自动分配的Appkey</span>"/>
</code>
</pre>
                            <h2>在自定义Application中调用ShareInstall.getInstance().init(context)方法完成SDK初始化，初始化前先判断当前进程是否是应用的主进程。</h2>
                            <pre style="width:900px;height:580px">
<code style="width: 100%;height: 96%;" class="lang-javascript">
public class MyApp extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        if (isMainProcess()) {
            ShareInstall.getInstance().init(getApplicationContext());
        }
    }

    /**
        * 判断当前进程是否是应用的主进程
        *
        * @return
        */
    public boolean isMainProcess() {
        int pid = android.os.Process.myPid();
        ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
        for (ActivityManager.RunningAppProcessInfo appProcess : activityManager.getRunningAppProcesses()) {
            if (appProcess.pid == pid) {
                return getApplicationInfo().packageName.equals(appProcess.processName);
            }
        }
        return false;
    }
}
</code>
</pre>

                            <h2>如果使用ShareInstall控制中心提供的注册统计功能，可调用方法ShareInstall.getInstance().reportRegister(); 注意该方法要在ShareInstall.getInstance().init
                                (context)方法之后调用，否则会抛异常。
                            </h2>
                            <pre style="width:400px;height:120px">
<code style="width: 100%;height: 91%;" class="lang-javascript">
// 调用注册接口
ShareInstall.getInstance().reportRegister();
</code>
</pre>
                            <h2>在AndroidMainfest.xml中的application标签中添加android:name=".MyApplication"指定自定义的Application类，以便程序启动的时候初始化自定义Application类，而不是系统默认的Application类。
                            </h2>
                            <pre style="width:400px;height:240px">
<code style="width: 100%;height: 91%;" class="lang-javascript">
&lt;application
        android:name=".MyApplication"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
&lt;/application&gt;
</code>
</pre>
                            <h1>三、一键跳转</h1>
                            <h2>在AndroidMainfest的唤醒页面activity标签中添加intent-filter（一般为MainActivity），配置scheme，用于浏览器中拉起。</h2>
                            <pre style="width:600px;height:270px">
<code style="width: 100%;height: 88%;" class="lang-javascript">
&lt;activity
        android:name=".MainActivity"
        android:launchMode="singleTask"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="android.intent.action.VIEW" /&gt;
        &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
        &lt;data android:scheme="<span class="doc-scheme">shareinstall为当前应用自动分配的scheme</span>" /&gt;
    &lt;/intent-filter&gt;
&lt;/activity&gt;
</code>
</pre>
                            <h2>注：如果唤醒页面和启动页是同一Activity，则AndroidMaifest.xml的配置如下。</h2>
                            <pre style="width:600px;height:350px">
<code style="width: 100%;height: 94%;" class="lang-javascript">
&lt;activity
        android:name=".MainActivity"
        android:launchMode="singleTask"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="android.intent.action.MAIN" /&gt;
        &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
    &lt;/intent-filter&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="android.intent.action.VIEW" /&gt;
        &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
        &lt;data android:scheme="<span class="doc-scheme">shareinstall为当前应用自动分配的scheme</span>"/&gt;
    &lt;/intent-filter&gt;
&lt;/activity&gt;
</code>
</pre>
                            <h2>
                                个性化安装和一键唤醒都调用同一个方法ShareInstall.getInstance().getInfo()获取相关信息，第一个参数为Intent(注：Intent可传null，但在配置了scheme唤醒的页面必须传，否则拿不到传递过来的参数)，第二个参数为信息回调监听
                            </h2>
                            <h1>四、个性化安装</h1>
                            <h2>在APP需要个性化安装参数时（由web网页中传递过来的，如邀请码、游戏房间号等 自定义参数），调用以下方法，在回调中获取参数。</h2>
                            <pre style="width:700px;height:170px">
<code style="width: 100%;height: 88%;" class="lang-javascript">
ShareInstall.getInstance().getInfo(intent, new AppGetInfoListener() {
    @Override
    public void onGetInfoFinish(String info) {
        Log.d("ShareInstall", "info = " + info);
    }
});
</code>
</pre>
                            <h1>五、唤醒页面获取信息</h1>
                            <pre style="width:600px;height:600px">
<code style="width: 100%;height: 80%;" class="lang-javascript">
public class WakeUpActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wake_up);
        // 获取唤醒参数
        ShareInstall.getInstance().getInfo(getIntent(), listener);
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        // 此处要调用，否则app在后台运行时，会无法截获
        ShareInstall.getInstance().getInfo(intent, listener);
    }

    private AppGetInfoListener listener = new AppGetInfoListener() {
        @Override
        public void onGetInfoFinish(String info) {
            Log.d("ShareInstall", "info = " + info);
        }
    };
</code>
</pre>
                        </div>
                    </div>
                    <div style="text-align:center; padding-bottom: 20px">
                        <!-- <a href="javascript:;" class="step_top step_prev" style="margin-right:100px" data-tab-index="1">上一步</a> -->
                        <a href="javascript:;" class="step_top step_next" style="background:#4890ff;color:#fff;margin-right:0" data-tab-index="1">下一步</a>
                    </div>
                </div>

                <div id="_deposit" class="my-app" style="display:none">
                    <div class="tab-content">
                        <div class="depoly-said" style="margin:0px 30px 20px;color:#00A4B0">
                            <b style="color:#00A4B0">提示：</b>导出apk测试包上传，shareinstall将自动完成所有应用配置工作，上传完成后即可进行在线模拟测试；待测试无误后，再完善下载配置信息。<br>
                             <p style="padding-left:42px;">signature versionsignature version需达到V2（Full Apk signature）级别</p>
                        </div>
                        <div class="tabbable deposite_list">
                            <div class="tab-content tab-op">
                                <div class="tab-pane active">
                                    <div class="pkgInfoContainer"></div>
                                    <div style="overflow:hidden">
                                        <a href="javascript:;" class="btn_a btn_upload btn-to-upload" style="float:right;margin-bottom:15px">上传APK文件</a>
                                    </div>
                                    <!-- <div class="pkgListContainer">
                                    <div>
                                        <table class="table-responsive table-hover channel_link_table">
                                            <thead>
                                            <tr>
                                                <th width="160px">
                                                    <a href="javascript:;" class="common-tip">
                                                        <span class="tip-content">上传安装包时，shareinstall将为每个安装包生成一个递增的序号</span>
                                                    </a>
                                                    序号
                                                </th>
                                                <th width="160px">版本号</th>
                                                <th width="160px">内部版本号</th>
                                                <th width="160px">文件大小</th>
                                                <th width="180px">上传日期</th>
                                                <th width="200px">操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            
                                            <tr class="empty">
                                            <td class="channel-table-bt" colspan="9" style="padding: 90px;line-height:30px">
                                            <p class="no-template">Android平台尚未集成，暂时无法使用！</p>
                                            <br/>
                                            <a href="javascript:;" class="btn_a doc-android"
                                            style="padding:8px 20px;display:inline;border-radius:0;background:#4890FF;cursor:pointer">现在去集成</a>
                                            </td>
                                            </tr>
                                            
                                            </tbody>
                                        </table>
                                    </div>
                                    <div style="padding:40px 0; text-align:center">

                                        1/0

                                        <span class="release-container-sp">共0条</span>
                                    </div>
                                </div> -->
                                    <script type="text/x-handlebars-template" class="pkgInfoTmp">
                                        <div class="apk-detail clearfix" style="text-align: left;margin: 30px 0 40px;position: relative">
                                            <div class="depoly-length" style="padding-bottom: 30px;">
                                                <div style="display:table">
                                                    <div style="display:table-cell;vertical-align:middle">
                                                        {{#if icon}}
                                                        <img src="{{icon}}" alt="" style="width:60px;height:60px;border-radius: 3px" /> {{else}}
                                                        <img src="./img/default-icon.png/default-icon.png" alt="" style="width:60px;height:60px;border-radius: 3px"
                                                        /> {{/if}}
                                                    </div>
                                                    <div style="padding-left: 20px;display:table-cell;">
                                                        <table class="detail-message">
                                                            <tr>
                                                                <!-- <td> -->
                                                                <!-- {{#if serialNumber}}
                                                                <p class="base-message">序号：<span>{{serialNumber}}</span>
                                                                </p>
                                                                {{/if}} -->
                                                                <!-- {{#if fileName}}
                                                                <p class="base-message">文件名：<span>{{fileName}}</span>
                                                                </p>
                                                                {{/if}} -->
                                                                <!-- </td> -->
                                                                <td>
                                                                    <p class="base-message">应用名：
                                                                        <span>{{app_name}}</span>
                                                                    </p>
                                                                </td>
                                                                <td>
                                                                    <p class="base-message">文件大小：
                                                                        <span>{{filesize}}</span>
                                                                    </p>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    {{#if createTime}}
                                                                    <p class="base-message">
                                                                        上传时间：
                                                                        <span>{{createTime}}</span>
                                                                    </p>
                                                                    {{/if}}
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="depoly-length ipa-message" style="padding: 30px 0;overflow: hidden;">
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <p class="info">
                                                                {{#if warns.appKey}}
                                                                <img src="/images/type/warn.png" alt="" /> {{/if}} {{#if errors.appKey}}
                                                                <img src="/images/type/error.png" alt="" /> {{/if}}
                                                                <span>appKey：</span>
                                                                <span class="ipa-message-name">{{app_key}}</span>
                                                            </p>
                                                            {{#if warns.appKey}}
                                                            <p class="warn">{{warns.appKey}}
                                                                <a href="javascript:;" class="doc-android-appKey">点此查看详情</a>
                                                            </p>
                                                            {{/if}} {{#if errors.appKey}}
                                                            <p class="error">{{errors.appKey}}
                                                                <a href="javascript:;" class="doc-android-appKey">点此查看详情</a>
                                                            </p>
                                                            {{/if}}
                                                        </td>
                                                        <td>
                                                            <p class="info">
                                                                {{#if warns.packageName}}
                                                                <img src="/images/type/warn.png" alt="" /> {{/if}} {{#if errors.packageName}}
                                                                <img src="/images/type/error.png" alt="" /> {{/if}}
                                                                <span>包名(applicationId)：</span>
                                                                <span class="ipa-message-name">{{application_id}}</span>
                                                            </p>
                                                            {{#if warns.packageName}}
                                                            <p class="warn">{{warns.packageName}}
                                                                <a href="javascript:;" class="doc-android-packageName">点此查看详情</a>
                                                            </p>
                                                            {{/if}} {{#if errors.packageName}}
                                                            <p class="error">{{errors.packageName}}
                                                                <a href="javascript:;" class="doc-android-packageName">点此查看详情</a>
                                                            </p>
                                                            {{/if}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <p class="info">
                                                                {{#if warns.versionDisplay}}
                                                                <img src="/images/type/warn.png" alt="" /> {{/if}} {{#if errors.versionDisplay}}
                                                                <img src="/images/type/error.png" alt="" /> {{/if}}
                                                                <span>版本号(versionName)：</span>
                                                                <span class="ipa-message-name">{{version_name}}</span>
                                                            </p>
                                                            {{#if warns.versionDisplay}}
                                                            <p class="warn">{{warns.versionDisplay}}</p>
                                                            {{/if}} {{#if errors.versionDisplay}}
                                                            <p class="error">{{errors.versionDisplay}}</p>
                                                            {{/if}}
                                                        </td>
                                                        <td>
                                                            <p class="info">
                                                                {{#if warns.versionCode}}
                                                                <img src="/images/type/warn.png" alt="" /> {{/if}} {{#if errors.versionCode}}
                                                                <img src="/images/type/error.png" alt="" /> {{/if}}
                                                                <span>内部版本号(versionCode)：</span>
                                                                <span class="ipa-message-name">{{version_code}}</span>
                                                            </p>
                                                            {{#if warns.version}}
                                                            <p class="warn">{{warns.version}}</p>
                                                            {{/if}} {{#if errors.version}}
                                                            <p class="error">{{errors.version}}</p>
                                                            {{/if}}
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <p class="info">
                                                                {{#if warns.shareinstallScheme}}
                                                                <img src="/images/type/warn.png" alt="" /> {{/if}} {{#if errors.shareinstallScheme}}
                                                                <img src="/images/type/error.png" alt="" /> {{/if}}
                                                                <span>scheme(由shareinstall自动分配)：</span>
                                                                <span class="ipa-message-name">{{scheme}}</span>
                                                            </p>
                                                            {{#if warns.shareinstallScheme}}
                                                            <p class="warn">{{warns.shareinstallScheme}}&nbsp;&nbsp;
                                                                <a href="javascript:;" class="doc-android-scheme">点此查看详情</a>
                                                            </p>
                                                            {{/if}} {{#if errors.shareinstallScheme}}
                                                            <p class="warn">{{errors.shareinstallScheme}}&nbsp;&nbsp;
                                                                <a href="javascript:;" class="doc-android-scheme">点此查看详情</a>
                                                            </p>
                                                            {{/if}}
                                                        </td>
                                                        <!-- <td>
                                                        <p class="info">
                                                            {{#if warns.certSha}}
                                                            <img src="/images/type/warn.png" alt=""/>
                                                            {{/if}}
                                                            {{#if errors.certSha}}
                                                            <img src="/images/type/error.png" alt=""/>
                                                            {{/if}}
                                                            <span>签名证书指纹(SHA-1)：</span>
                                                            <span class="ipa-message-name">{{certSha}}</span>
                                                        </p>
                                                        {{#if warns.certSha}}
                                                        <p class="warn">{{warns.certSha}}&nbsp;&nbsp;<a
                                                                href="javascript:;" class="doc-android-cert">点此查看详情</a>
                                                        </p>
                                                        {{/if}}
                                                        {{#if errors.certSha}}
                                                        <p class="warn">{{errors.certSha}}&nbsp;&nbsp;<a
                                                                href="javascript:;" class="doc-android-cert">点此查看详情</a>
                                                        </p>
                                                        {{/if}}
                                                    </td> -->
                                                    </tr>
                                                </table>
                                            </div>
                                            <!--<div class="dashbord-loading" id="loading_tr" style="z-index: 99999;position: absolute;display: none">-->
                                            <!--<img src="/images/loading.gif" style="width: 60px;height: 60px;left: 50%;">-->
                                            <!--</div>-->
                                        </div>
                                    </script>
                                    <script type="text/x-handlebars-template" class="pkgListTmp">
                                        <div>
                                            <table class="table-responsive table-hover channel_link_table">
                                                <thead>
                                                    <tr>
                                                        <th width="160px">
                                                            <a href="javascript:;" class="common-tip">
                                                                <span class="tip-content">上传安装包时，shareinstall将为每个安装包生成一个递增的序号</span>
                                                            </a>
                                                            序号
                                                        </th>
                                                        <th width="160px">版本号</th>
                                                        <th width="160px">内部版本号</th>
                                                        <th width="160px">文件大小</th>
                                                        <th width="180px">上传日期</th>
                                                        <th width="200px">操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {{#with rows}} {{#each this}} {{#if using}}
                                                    <tr style="color:blue" data-row-index="{{_index}}" data-pkgId="{{id}}">
                                                        {{else}}
                                                        <tr data-row-index="{{_index}}" data-pkgId="{{id}}">
                                                            {{/if}}
                                                            <td class="release_td">{{serialNumber}}</td>
                                                            <td class="release_td">{{versionDisplay}}</td>
                                                            <td class="release_td">{{version}}</td>
                                                            <td class="release_td">{{sFileSize}}</td>
                                                            <td class="release_td">{{sUploadTime}}</td>
                                                            <td class="release_td">
                                                                {{#if using}} {{/if}} {{#unless using}}
                                                                <a href="javascript:;" class="deploy-pkg-button" style="width:80px;display:inline-block;color:#5BD377">
                                                                    <img src="images/type/fabu.png" alt="" />&nbsp;&nbsp;发布</a>
                                                                <a href="javascript:;" class="remove-pkg-button" style="width:80px;display:inline-block;color:#399CFF">
                                                                    <img src="images/type/rubbish.png" alt="" />&nbsp;&nbsp;删除</a>
                                                                {{/unless}}
                                                            </td>
                                                        </tr>
                                                        {{/each}} {{else}} {{/with}}
                                                        <!--{{#unless integrated}}-->
                                                        <!--<tr class="empty">-->
                                                        <!--<td class="channel-table-bt" colspan="9" style="padding: 90px;line-height:30px">-->
                                                        <!--<p class="no-template">Android平台尚未集成，暂时无法使用！</p>-->
                                                        <!--<br/>-->
                                                        <!--<a href="javascript:;" class="btn_a doc-android"-->
                                                        <!--style="padding:8px 20px;display:inline;border-radius:0;background:#4890FF;cursor:pointer">现在去集成</a>-->
                                                        <!--</td>-->
                                                        <!--</tr>-->
                                                        <!--{{/unless}}-->
                                                </tbody>
                                            </table>
                                        </div>
                                        <div style="padding:40px 0; text-align:center">
                                            {{#if hasPrev}}
                                            <a style="cursor:pointer;" class="page-prev">上一页</a>{{/if}} {{#eval}}pageNum+1{{/eval}}/{{pages}} {{#if hasNext}}
                                            <a style="cursor:pointer;" class="page-next">下一页</a>{{/if}}
                                            <span class="release-container-sp">共{{total}}条</span>
                                        </div>
                                    </script>
                                </div>
                            </div>
                        </div>
                        <div style="margin:0 auto 0 auto;display:none" class="deposite_upload">
                            <div style="overflow:hidden;margin-bottom:-30px">
                                <a href="javascript:;" class="btn_a btn-upload-back btn_upload" style="float:right;margin:0;padding:5px 30px;margin-right:20px">返&nbsp;&nbsp;回</a>
                            </div>
                            <div class="deposit-uploader-container">
                                <style>
                                    .progress {
                                        height: 20px;
                                        background: #ebebeb;
                                        border-left: 1px solid transparent;
                                        border-right: 1px solid transparent;
                                        border-radius: 10px;
                                        width: 75%;
                                        margin: 30px auto
                                    }

                                    .progress>span {
                                        position: relative;
                                        float: left;
                                        margin: 0 -1px;
                                        min-width: 30px;
                                        height: 18px;
                                        line-height: 16px;
                                        text-align: right;
                                        background: #ccc;
                                        border: 1px solid;
                                        border-color: #bfbfbf #b3b3b3 #9e9e9e;
                                        border-radius: 10px;
                                        background-image: -webkit-linear-gradient(top, #f0f0f0 0, #dbdbdb 70%, #ccc 100%);
                                        background-image: -moz-linear-gradient(top, #f0f0f0 0, #dbdbdb 70%, #ccc 100%);
                                        background-image: -o-linear-gradient(top, #f0f0f0 0, #dbdbdb 70%, #ccc 100%);
                                        background-image: linear-gradient(to bottom, #f0f0f0 0, #dbdbdb 70%, #ccc 100%);
                                        -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, .3), 0 1px 2px rgba(0, 0, 0, .2);
                                        box-shadow: inset 0 1px rgba(255, 255, 255, .3), 0 1px 2px rgba(0, 0, 0, .2)
                                    }

                                    .progress .blue {
                                        background: #a5d4f1;
                                        border-color: #459fd6 #3094d2 #277db2;
                                        background-image: -webkit-linear-gradient(top, #aed5ed 0, #7bbbe2 70%, #5aaadb 100%);
                                        background-image: -moz-linear-gradient(top, #aed5ed 0, #7bbbe2 70%, #5aaadb 100%);
                                        background-image: -o-linear-gradient(top, #aed5ed 0, #7bbbe2 70%, #5aaadb 100%);
                                        background-image: linear-gradient(to bottom, #aed5ed 0, #7bbbe2 70%, #5aaadb 100%)
                                    }

                                    .upload-percent {
                                        position: relative;
                                        top: -50px;
                                        left: 40%;
                                        color: #78cfff;
                                        font-weight: 700;
                                        font-size: 16px
                                    }

                                    #up_container input[type=file] {
                                        cursor: pointer
                                    }

                                    #upimg {
                                        position: relative;
                                        text-align: center;
                                        font: 8px/10px '微软雅黑', '黑体', sans-serif;
                                        width: 500px;
                                        height: 10px;
                                        border: 0;
                                        margin: 50px auto 0;
                                        border-radius: 10px;
                                        background: #e8e8e8;
                                        display: none;
                                    }

                                    #load {
                                        width: 0%;
                                        height: 100%;
                                        background: #0e92ff;
                                        text-align: center;
                                        font-size: 12px;
                                        border-radius: 10px;
                                    }
                                </style>
                                <div class="item-upload up_container">
                                    <div class="up_area" style="position:absolute;top:0;left:0;width:100%;height:100%">
                                        <a href="javascript:;" class="btn_a up_button" style="margin: 200px auto 40px; background: #40d6d6; border-radius: 4px; color: rgb(255, 255, 255); position: relative; z-index: 1;">
                                            选择apk文件
                                            <input type="file" name="mof" class="upload-filebtn" />
                                        </a>
                                        <!-- <div id="upimg">
                                            <div id="load" style="width: 0%;">0%</div>
                                        </div> -->
                                        <p style="color:#898989">
                                            在此上传apk安装包仅用于在线检查shareinstall集成配置，方便开发者快速集成与测试，不存在额外的安全隐患。</p>
                                        <p style="color:#898989">(单个文件最大支持800M)</p>
                                        <p style="color:#f47870;margin-top:150px">请使用chrome,firefox,safari,edge或是IE&gt;=10的浏览器</p>
                                    </div>
                                    <div class="drag_area" style="position:absolute;top:0;left:0;width:100%;height:100%;display:none">
                                        <p style="height:100%;background:#4c4c4c;line-height:300px;color:#fff">
                                            将文件拖拽至此区域，即可上传</p>
                                    </div>
                                    <div class="drag_listener" style="opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;display:none"></div>
                                    <div id="html5_1c3uu47tv62v1ml0km1d201eve3_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; overflow: hidden; z-index: 0;">
                                        <input id="html5_1c3uu47tv62v1ml0km1d201eve3" type="file" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"
                                            accept="">
                                    </div>
                                </div>
                                <div class="item-upload up_progress" style="display:none">
                                    <p style="margin-top:220px">
                                        <span>文件名：</span>
                                        <span class="filename"></span>
                                    </p>
                                    <p>
                                        <span>已上传：</span>
                                        <span class="prog_uploaded"></span>
                                    </p>
                                    <!-- <p>
                                        <span>上传速度：</span>
                                        <span class="prog_speed"></span>
                                    </p> -->
                                    <div id="upimg">
                                        <div id="load" style="width: 0%;"></div>
                                        <div id="loadProcess" style="position:absolute;right:-45px;top:0px;color:#00a4ff">0%</div>
                                    </div>
                                    <p style="margin-bottom:40px">文件正在上传，请勿关闭浏览器</p>
                                    <button style="color:#00a4ff;margin:20px auto 20px;border-color:#00a4ff" class="btn_submit stop_upload">取消上传</button>
                                </div>
                            </div>
                        </div>
                        <div style="text-align:center;padding-bottom:30px">
                            <a href="javascript:;" class="step_top step_prev" style="margin-right:100px" data-tab-index="0">上一步</a>
                            <a href="javascript:;" class="step_top step_next" style="background:#4890ff;color:#fff;margin-right:0" data-tab-index="2">下一步</a>
                        </div>
                    </div>

                </div>
                <div id="_config" class="my-app" style="display: none;">
                    <div class="tab-content">
                        <div class="depoly-said depoly-top" style="margin:0px 30px 20px;color:#00A4B0">
                            <b style="color:#00A4B0">提示：</b>请先去完成apk包上传
                        </div>
                        <div>
                            <form class="common-form">
                                <input type="hidden" name="appId" value="690052788" disabled="">
                                <div class="depoly-length" style="padding-top:10px">
                                    <div class="depoly-web">
                                        <div style="margin-bottom: 30px;">
                                            <span class="config-ios-name">
                                                <a href="javascript:;" class="common-tip">
                                                    <span class="tip-content">appKey是shareinstall平台为每个应用分配的唯一标识符，sdk(Android/iOS/javascript)中需指定这个appKey</span>
                                                </a>
                                                AppKey
                                            </span>
                                            <div class="config-text">
                                                <div>
                                                    <span style="color:#282828;font-weight:bold" id="configAppKey"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div style="margin-bottom: 30px;">
                                            <span class="config-ios-name">
                                                <a href="javascript:;" class="common-tip">
                                                    <span class="tip-content">packageName在代码中使用，通常在AndroidManifest.xml中指定，applicationId则只是用于程序的标识，通常在build.gradle中指定。
                                                        如果您没有在您的 build.gradle 文件中定义 applicationId，这个applicationId 将默认为 AndroidManifest.xml
                                                        中所指定的packageName的值。
                                                    </span>
                                                </a>
                                                applicationId
                                                <b style="color:#F26358;">*</b>
                                            </span>
                                            <div class="config-text">
                                                <div>
                                                    <!-- <input type="text" name="pkgName" value="" disabled="" id="configAppId"> -->
                                                    <span style="color:#282828;font-weight:bold" id="configAppId"></span>
                                                </div>
                                            </div>
                                        </div>

                                        <div>
                                            <span class="config-ios-name">
                                                <a href="javascript:;" class="common-tip">
                                                    <span class="tip-content">shareinstall为每个应用随机分配的scheme，并保证唯一性，开发者需将此scheme配置到AndroidManifest.xml中，才能顺利拉起app</span>
                                                </a>
                                                scheme
                                            </span>
                                            <div class="config-text">
                                                <div>
                                                    <span style="color:#282828;font-weight:bold" id="configScheme"></span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- <div class="depoly-length">
                                    <div style="padding: 30px 0 30px;">
                                        <fieldset>
                                            <legend>
                                                <div>
                                                    <span style="color:#282828;margin: 30px 0 20px 0;" class="config-ios-name">启用scheme</span>
                                                    <div class="config-text">
                                                        <div>
                                                            <label class="depoly-label">
                                                                <input class="fieldset_switch" type="checkbox" name="schemaEnabled"
                                                                    value="true" checked="">&nbsp;&nbsp;启用</label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </legend>
                                            <div style="height: 1px"></div>
                                            <div class="depoly-said depoly-txt">
                                                <b>提示：</b>在app已安装的情况下，从各种浏览器中拉起App。</div>
                                            <div>
                                                <span class="config-ios-name">
                                                    <a href="javascript:;" class="common-tip">
                                                        <span class="tip-content">shareinstall为每个应用随机分配的scheme，并保证唯一性，开发者需将此scheme配置到AndroidManifest.xml中，才能顺利拉起app</span>
                                                    </a>
                                                    scheme
                                                </span>
                                                <div class="config-text">
                                                    <div>
                                                        <span style="color:#282828;font-weight:bold" id="configScheme"></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </fieldset>
                                    </div>
                                </div> -->
                                <!-- <div class="depoly-length" style="padding-bottom:30px">
                                <fieldset>
                                    <div class="depoly-web" style="padding:0">
                                        <legend>
                                            <div>
                                                <span style="color:#282828;margin: 30px 0 20px 0;"
                                                      class="config-ios-name">API安全验证</span>
                                                <div class="config-text">
                                                    <div>
                                                        <label class="depoly-label"><input class="fieldset_switch"
                                                                                           type="checkbox"
                                                                                           name="certVerifyEnabled"
                                                                                           value="true">&nbsp;&nbsp;启用</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </legend>
                                        <div style="height: 1px"></div>
                                    </div>
                                    <div class="depoly-said depoly-txt"><b>提示：</b>通过启用API安全验证，开发者在保证本app签名证书不外泄的前提下，shareinstall服务器可防止统计数据造假
                                    </div>
                                    <div class="depoly-web">
                                        <div>
                            <span class="config-ios-name">
                                <a href="javascript:;" class="common-tip">
                                    <span class="tip-content">apk签名证书的SHA-1指纹，使用jdk自带工具keytool即可获取:"keytool -list -keystore xxx -storepass xxx"</span>
                                </a>
                               apk签名证书指纹
                                <br>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;（SHA-1）
                            </span>
                                            <div class="config-text">
                                                <div>
                                                    <input type="text" name="certSha" value="" disabled="">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                            </div> -->
                                <div class="depoly-length">
                                    <fieldset>
                                        <div class="depoly-web" style="padding:0">
                                            <legend>
                                                <div>
                                                    <span style="color:#282828;margin: 30px 0 20px 0;" class="config-ios-name">集成应用宝</span>
                                                    <div class="config-text">
                                                        <div>
                                                            <label class="depoly-label">
                                                                <input class="fieldset_switch" type="checkbox" name="yybEnabled" value="true">&nbsp;&nbsp;启用&nbsp;&nbsp;</label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </legend>
                                            <div style="height: 1px"></div>
                                        </div>
                                        <div class="depoly-said depoly-txt">
                                            <b>提示：</b>只在微信QQ下有效，如无法申请到应用宝的app link功能（在应用宝中使用scheme拉起app并还原数据），请联系shareinstall技术客服！
                                        </div>
                                        <div class="depoly-web">
                                            <div>
                                                <span class="config-ios-name">应用宝地址</span>
                                                <div class="config-text">
                                                    <div>
                                                        <input type="text" name="yybUrl" value="" disabled="">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                                <!-- <div class="depoly-length" style="padding-bottom:30px">
                                <fieldset>
                                    <div class="depoly-web" style="padding:0">
                                        <legend>
                                            <div>
                                                <span style="color:#282828;margin: 30px 0 20px 0;"
                                                      class="config-ios-name">APK包自行托管</span>
                                                <div class="config-text">
                                                    <div>
                                                        <label class="depoly-label"><input class="fieldset_switch"
                                                                                           type="checkbox"
                                                                                           name="apkExternalEnabled"
                                                                                           value="true">&nbsp;&nbsp;启用&nbsp;&nbsp;</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </legend>
                                        <div style="height: 1px"></div>
                                    </div>
                                    <div class="depoly-said depoly-txt">
                                        <b>提示：</b>shareinstall默认对APK包进行托管，用户也可在此提供APK文件的下载地址，使用第三方托管的方式<a
                                            href="javascript:;" class="common-tip">
                                        <span class="tip-content">我们推荐用户使用shareinstall平台的apk包托管功能，以得到最优的安装流程；</span>
                                    </a>
                                        <span
                                        style="color:red">但可能降低数据还原的成功率与app安装的体验，请慎重！</span>
                                    </div>
                                    <div class="depoly-web" style="padding:0">
                                        <div>
                                            <span class="config-ios-name">APK下载地址</span>
                                            <div class="config-text">
                                                <div>
                                                    <input type="text" name="apkExternalUrl" value="" disabled="">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>

                            </div>
                            <div class="depoly-length" style="padding-bottom:30px">
                                <fieldset>
                                    <div class="depoly-web" style="padding:0">
                                        <legend>
                                            <div>
                                                <span style="color:#282828;margin: 30px 0 20px 0;"
                                                      class="config-ios-name">集成本地应用市场</span>
                                                <div class="config-text">
                                                    <div>
                                                        <label class="depoly-label"><input class="fieldset_switch"
                                                                                           type="checkbox"
                                                                                           name="marketEnabled"
                                                                                           value="true" >&nbsp;&nbsp;启用&nbsp;&nbsp;</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </legend>
                                        <div style="height: 1px"></div>
                                    </div>
                                    <div class="depoly-said depoly-txt"><b>提示：</b>将使用market协议拉起本机的应用市场app(即：<strong>market://details?id=packageName</strong>)；<span
                                            style="color:red">由于国产Android厂商的多样性，在开启此选项前请确保app已上架到所有应用市场，请慎重！</span>
                                    </div>
                                </fieldset>
                            </div> -->
                                <div style="color:#00A4B0;font-size:14px;padding-top:10px;">
                                   保存将在10分钟后生效！
                                </div>
                                <div style="padding:30px 0 40px 0">
                                    <button type="button" id="saveForm" class="btn_a btn_submit submit_btn">保 存</button>
                                </div>
                            </form>

                            <div style="text-align:center; padding-bottom: 20px">
                                <a href="javascript:;" class="step_top step_prev" style="margin-right:100px" data-tab-index="1">上一步</a>
                                <!-- <a href="javascript:;" class="step_top step_next" style="background:#4890ff;color:#fff;margin-right:0"
                                        data-tab-index="1">下一步</a> -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div style="background:#fff;width:800px;height:auto;display:none" id="_win_web_test">
        <form id="gen_test_form" class="common-form">
            <input type="hidden" name="appId">
            <fieldset style="margin-bottom:30px">
                <legend>
                    <label class="depoly-label" style="margin-left:60px;font-size:18px">生成测试链接</label>
                </legend>
                <div class="depoly-said" style="margin-left:60px;width:90%">
                    <b>提示：</b>在此输入一对任意的参数名/参数值，将生成一个测试链接； 手机扫描二维码即可开始测试。</div>
                <div style="border-bottom:1px solid #ededed;overflow:hidden;padding-bottom:10px">
                    <div style="border-bottom:none;min-height:100px;float:left;min-width:400px;padding-top:50px">
                        <p>
                            <span class="config-ios-name" style="margin-left:60px;margin-right:10px;width:100px">key</span>
                            <input type="text" name="key" value="testKey" placeholder="随机输入一个key" style="padding:5px 5px 5px 5px" maxlength="20">
                        </p>
                        <p>
                            <span class="config-ios-name" style="margin-left:60px;margin-top:40px;margin-right:10px;width:100px">value</span>
                            <input type="text" name="value" value="testValue" placeholder="随机输入一个value" style="margin-top:40px;padding:5px 5px 5px 5px" maxlength="20">
                        </p>
                    </div>
                    <div style="float:right">
                        <div style="width:180px;height:180px;margin-top:15px;border:2px solid #ededed;line-height:180px;text-align:center"
                            class="qr_img"></div>
                        <p style="width:300px;height:auto;margin-top:20px"></p>
                    </div>
                </div>
                <p style="text-align:center">
                    <button type="button" class="depoly-button" style="margin:30px 0 20px 65px;color:#0c6;border:1px solid #0c6;background:#fff">生成测试链接</button>
                </p>
            </fieldset>
        </form>
    </div>

    <div style="background:#fff;width:420px;height:auto;display:none;text-align:center" id="paymentInfo">
        <img src="./img/console/shareinstall.png" alt="" style="padding: 28px 0 10px">
        <p class="pop-appname">Shareinstall</p>
        <div class="pop-status">服务已过期</div>

        <a href="./payment.html" class="btn-poppay">去开通服务</a>
    </div>

    <div id="J_functionBar" class="functionBar">
        <div class="bar-qq">
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=2881355608&amp;site=qq&amp;menu=yes" class="icon icon1" title="点击这里给我发消息">
    
            </a>
            联系
        </div>
        <!--<div class="bar-code">-->
        <!--<span class="icon icon2">-->
    
        <!--</span>-->
        <!--关注-->
        <!--</div>-->
        <div class="bar-back" id="J_barBack">
            返&nbsp;回<br>
            顶&nbsp;部
        </div>
    </div>
</body>

</html>